


import excel using "$base/InputData/LongRunLifeExpectanciesByCountry.xlsx", firstrow case(lower) clear
keep if code=="GBR"


tsset y
tsfill
ipolate life y, gen(le)
keep year le

/*tsfilter hp lepiefluc = le, smooth(100)
gen hple=le-lepiefluc 
keep year hple
*/

gen pie=1-25/le

tsfilter hp hppiefluc = pie, smooth(100)
gen hppie=pie-hppiefluc 
keep year hppie


gen temp=mod(year,25)
keep if temp==0
keep year hppie

sort year

export delimited year hp using "$base/Outputs/Data/UkSurvProb.csv", replace
